package com.shop.sms;

import com.alibaba.fastjson.JSONObject;
import com.shop.base.BaseResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created with IntelliJ IDEA.
 * User: 王瑞文
 * Date: 2020/9/6
 * Time: 11:33
 * To change this template use File | Settings | File Templates.
 * Description:
 */
@Api(tags = "短信服务")
public interface smsService {
    /**
     * 短信发送服务
     *
     * @return
     */
    @PostMapping("/sendSms")
    @ApiOperation("发送短信")
    BaseResponse<JSONObject> sendSms(@RequestParam("phone") String phone);

    /**
     * 短信验证服务
     *
     * @return
     */
    @PostMapping("/checkSms")
    @ApiOperation("短信验证服务")
    BaseResponse<JSONObject> checkSms(@RequestParam("phone") String phone
            , @RequestParam("code") String code);

}
